#ifndef __CLI_PARSE__FLAGS_H__
#define __CLI_PARSE__FLAGS_H__

#ifdef _MSC_VER
#  pragma warning (disable:4800)  /* Disable int to boolean warnings. */
#endif

#ifdef WIN32
#include <Windows.h>
/////////////////////////////////////////////////////////////////
// Windows Messages

  // Custom messages
  enum CLI_PARSE_MESSAGES {
    WM_RELOAD_ROOMS           = (WM_USER + 0x01),
    WM_RELOAD_LEVEL           = (WM_USER + 0x02),
    WM_RELOAD_WINDOW          = (WM_USER + 0x03),
    WM_GO_TO_POSITION         = (WM_USER + 0x04),
  };
#endif

/////////////////////////////////////////////////////////////////
// Flags

  // When this line is passed, an event will occur...
  enum CLI_TRIP_FLAGS {
    // Teleport to location. trip1 = x, trip2 = y, trip3 = min rank, trip4 = angle.
    TRIP_TELEPORT             = 0x00000020,
    TRIP_FLIP                 = 0x00000040,
    TRIP_GOALPOSTING          = 0x00000080,

    TRIP_LEVELCHANGE          = 0x00000100, // trip1 = x, trip2 = y, trip3 = angle, trip4 = levelid
    TRIP_SOUNDEFFECT          = 0x00000200, // trip1 = sound id
    TRIP_SHOWMESSAGE          = 0x00000400, // trip1 = message id
    TRIP_QUESTBUILDER         = 0x00000800
  };


  enum trip_message_type {
    NO_TRIP_MESSAGE = 0,
    TRAIN_JUMP,
    TRAIN_TELEPORTAL,

    TRAIN_CHAT_START,
    TRAIN_TALK,
    TRAIN_SHOUT,
    TRAIN_WHISPER,
    TRAIN_EMOTE,
    TRAIN_BOW,
    TRAIN_CHAT_FINISH,
  
    TRAIN_SKILLS_START, // 10
    TRAIN_SKILLS_SECOND,
    TRAIN_SKILLS_THIRD,
    TRAIN_SKILLS_KNOW,
    TRAIN_SKILLS_MEDITATE,
    TRAIN_SKILLS_TRAIL,
    TRAIN_SKILLS_DRAIN_NIGHTMARE,
    TRAIN_SKILLS_RANDOM,
    TRAIN_SKILLS_FOCUS,
    TRAIN_SKILLS_JOINPARTY,
    TRAIN_SKILLS_FINISH, // 20
  
    TRAIN_INVENTORY_START,
    TRAIN_INVENTORY_MID,
    TRAIN_INVENTORY_FINISH,
  
    TRAIN_HOUSES_START,
    TRAIN_HOUSES_MOON,
    TRAIN_HOUSES_ECLIPSE,
    TRAIN_HOUSES_SHADOW,
    TRAIN_HOUSES_COVENANT,
    TRAIN_HOUSES_RADIANCE,
    TRAIN_HOUSES_CALENTURE, // 30
    TRAIN_HOUSES_ENTRANCED,
    TRAIN_HOUSES_LIGHT,

    TRAIN_FOLLOW_TORCHES,
    TRAIN_SKILLS_GIVE,
    TRAIN_SKILLS_MAJORMINOR,
    TRAIN_SKILLS_POWER,
    TRAIN_SKILLS_ORBIT,
    TRAIN_HOUSES_CITYMAP,
    TRAIN_HOUSES_CONSIDER,
    TRAIN_HOUSES_FINDTEACHER, // 40
    TRAIN_HOUSES_TRAINAGAIN,
  
    TRAIN_SANCTUARY_START,
    TRAIN_SANCTUARY_FINISH,
    TRAIN_SKILLS_LOCATE_AVATAR, 
    TRAIN_INVENTORY_EXIT,

    LIBRARY_ENTRANCE,

    TRAIN_SKILLS_SENSE,
    TRAIN_BELIEF_MOON,
    TRAIN_BELIEF_ECLIPSE,
    TRAIN_BELIEF_SHADOW, //50
    TRAIN_BELIEF_COVENANT,
    TRAIN_BELIEF_RADIANCE,
    TRAIN_BELIEF_CALENTURE,
    TRAIN_BELIEF_ENTRANCED,
    TRAIN_BELIEF_LIGHT, //55

    TRAIN_QUEST_BUILDER1,
    TRAIN_QUEST_BUILDER2
  };


  // Linedef flags - shared with level editor ( bits 0 - 23 )
  enum CLI_LINEDEF_FLAGS {
    NORM                      = 0x00000000,
    BOUND                     = 0x00000001,  // Line spans from floor to ceiling.
    TRIP_CROSS                = 0x00000002,  // Crossing the line "trips" something.
    TRIP_ACTIVATE             = 0x00000004,  // Pressing space bar or mouse button.
    LINE_GOES_TO_RECRUITING    = 0x00000008,  //
    LINE_ANIMATED             = 0x00000010,  // The line is animated
    LINE_GOES_TO_HOUSE        = 0x00000020,
    LINE_SECTOR_FLOOR_BASE    = 0x00000040,  // Baseline for sloping floor of line's sector 
    LINE_SECTOR_CEILING_BASE  = 0x00000080,  // Baseline for sloping ceiling of line's sector
    LINE_FACING_FLOOR_BASE    = 0x00000100,  // Baseline for sloping floor of line's facing sector
    LINE_FACING_CEILING_BASE  = 0x00000200,  // Baseline for sloping ceiling of line's facing sector
    LINE_S_IMPASS             = 0x00000400,

    LINE_STRETCH_FWALL_HORZ   = 0x00000800,  // Stretch texture across floor wall, don't tile
    LINE_STRETCH_FWALL_VERT   = 0x00001000,  // Stretch texture down  floor wall, don't tile
    LINE_STRETCH_CWALL_HORZ   = 0x00002000,  // Stretch texture across ceiling wall, don't tile
    LINE_STRETCH_CWALL_VERT   = 0x00004000,  // Stretch texture down ceiling wall,  don't tile

    LINE_NO_WARD              = 0x00008000,  // Linedef is not wardable

    LINE_FLIP_FWALL_HORZ      = 0x00010000,  // Flip texture horizontally on floor wall
    LINE_FLIP_FWALL_VERT      = 0x00020000,  // Flip texture vertically on floor wall
    LINE_FLIP_CWALL_HORZ      = 0x00040000,  // Flip texture horizontally on ceiling wall
    LINE_FLIP_CWALL_VERT      = 0x00080000,  // Flip texture vertically on ceiling wall

    LINE_SABLE_MOON           = 0x00100000,
    LINE_ECLIPSE              = 0x00200000,
    LINE_SHADOW               = 0x00400000,
    LINE_COVENT               = 0x00800000,
    LINE_RADIANCE             = 0x01000000,
    LINE_CALENTURE            = 0x02000000,
    LINE_ENTRANCED            = 0x04000000,
    LINE_LIGHT                = 0x08000000,
    
    LINE_HULL_SPLITTER        = 0xFFFFFFFF
  };


  // Sector Flags
  enum CLI_SECTOR_FLAGS {
    SECTOR_SELFILLUMINATING   = 0x00000001,
    SECTOR_SKY                = 0x00000002,
    SECTOR_NO_STRETCH_FLOOR   = 0x00000004,
    SECTOR_NO_STRETCH_CEILING = 0x00000008,
    SECTOR_NOCOLLIDE          = 0x00000010,
    SECTOR_ALTSHADE           = 0x00000020,
    SECTOR_ITEMS_INVISIBLE    = 0x00000040,
    SECTOR_ANIMATING          = 0x00000080
  };


  // Sector Tags: Effects of sector tags are applied every two seconds
  enum CLI_SECTOR_TAGS {
    SECTOR_WILLPOWER   =    1, // Add 1 point 
    SECTOR_INSIGHT     =    2,
    SECTOR_RESILIENCE  =    3,
    SECTOR_LUCIDITY    =    4,
    SECTOR_DREAMSOUL   =    5,
    SECTOR_DAMAGE      =    6, // Lose 1 point
    SECTOR_CURSE       =    7,
    SECTOR_NO_REGEN    =    8
  };


  // Room Flags
  enum CLI_ROOM_FLAGS {
    ROOM_SANCTUARY           = 0x00000001,
    ROOM_NOREAP              = 0x00000002,
    ROOM_SABLE_MOON          = 0x00000004,
    ROOM_ECLIPSE             = 0x00000008,
    ROOM_SHADOW              = 0x00000010,
    ROOM_COVENT              = 0x00000020,
    ROOM_RADIANCE            = 0x00000040,
    ROOM_CALENTURE           = 0x00000080,
    ROOM_ENTRANCED           = 0x00000100,
    ROOM_LIGHT               = 0x00000200
  };

  // Actor Flags
  enum CLI_ACTOR_FLAGS {
    // Flags settable in editor
    ACTOR_ITEMGENERATOR  = 0x00000001,
    ACTOR_AGENTGENERATOR = 0x00000002,
    ACTOR_NOCOLLIDE      = 0x00000004,
    ACTOR_CEILHANG       = 0x00000008,

    // These can be reused for player/neighbor effects
    ACTOR_ENTRYPOINT     = 0x00000010,
    ACTOR_RECALLPOINT    = 0x00000020
  };

#endif /* __CLI_PARSE__FLAGS_H__ */
